package sv.gob.mh.dgii.model;

// Generated Dec 10, 2007 4:52:21 PM by Hibernate Tools 3.2.0.beta7

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DcSaldAnt generated by hbm2java
 */
@Entity
@Table(name = "DC_SALD_ANT", schema = "EDADEPUDOC", uniqueConstraints = {})
public class DcSaldAnt implements java.io.Serializable {

	// Fields    

	/**
	 * 
	 */
	private static final long serialVersionUID = 788900205667972095L;

	private String nfolio;

	private RcRuc rcRuc;

	private String cusuario;

	private String cusuarioAplica;

	private Date fhingreso;

	private Date felaboracion;

	private String maplicado;

	private Date faplicado;

	private String sobservacion;

	private Date fdepuracion;

	private BigDecimal vtotalImp;

	private BigDecimal vtotalMult;

	private BigDecimal vtotal;

	private BigDecimal vtotalInt;

	private String ctipoBoleta;

	private Set<DcSaldAntDet> dcSaldAntDets = new HashSet<DcSaldAntDet>(0);

	// Constructors

	/** default constructor */
	public DcSaldAnt() {
	}

	/** minimal constructor */
	public DcSaldAnt(String nfolio, RcRuc rcRuc, Date fhingreso,
			Date felaboracion, String maplicado) {
		this.nfolio = nfolio;
		this.rcRuc = rcRuc;
		this.fhingreso = fhingreso;
		this.felaboracion = felaboracion;
		this.maplicado = maplicado;
	}

	/** full constructor */
	public DcSaldAnt(String nfolio, RcRuc rcRuc, String cusuario,
			String cusuarioAplica, Date fhingreso, Date felaboracion,
			String maplicado, Date faplicado, String sobservacion,
			Date fdepuracion, BigDecimal vtotalImp, BigDecimal vtotalMult,
			BigDecimal vtotal, BigDecimal vtotalInt, String ctipoBoleta,
			Set<DcSaldAntDet> dcSaldAntDets) {
		this.nfolio = nfolio;
		this.rcRuc = rcRuc;
		this.cusuario = cusuario;
		this.cusuarioAplica = cusuarioAplica;
		this.fhingreso = fhingreso;
		this.felaboracion = felaboracion;
		this.maplicado = maplicado;
		this.faplicado = faplicado;
		this.sobservacion = sobservacion;
		this.fdepuracion = fdepuracion;
		this.vtotalImp = vtotalImp;
		this.vtotalMult = vtotalMult;
		this.vtotal = vtotal;
		this.vtotalInt = vtotalInt;
		this.ctipoBoleta = ctipoBoleta;
		this.dcSaldAntDets = dcSaldAntDets;
	}

	// Property accessors
	@Id
	@Column(name = "N_FOLIO", unique = true, nullable = false, insertable = false, updatable = false, length = 12 )
	 
	public String getNfolio() {
		return this.nfolio;
	}

	public void setNfolio(String nfolio) {
		this.nfolio = nfolio;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT",  unique = false, nullable = false, insertable = true, updatable = true)
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@Column(name = "C_USUARIO", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "C_USUARIO_APLICA", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public String getCusuarioAplica() {
		return this.cusuarioAplica;
	}

	public void setCusuarioAplica(String cusuarioAplica) {
		this.cusuarioAplica = cusuarioAplica;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", unique = false, nullable = false, insertable = true, updatable = false  )
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "F_ELABORACION", unique = false, nullable = false, insertable = true, updatable = true )
	public Date getFelaboracion() {
		return this.felaboracion;
	}

	public void setFelaboracion(Date felaboracion) {
		this.felaboracion = felaboracion;
	}

	@Column(name = "M_APLICADO", unique = false, nullable = false, insertable = true, updatable = true, length = 1,columnDefinition ="default 1")
	public String getMaplicado() {
		return this.maplicado;
	}

	public void setMaplicado(String maplicado) {
		this.maplicado = maplicado;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "F_APLICADO", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFaplicado() {
		return this.faplicado;
	}

	public void setFaplicado(Date faplicado) {
		this.faplicado = faplicado;
	}

	@Column(name = "S_OBSERVACION", unique = false, nullable = true, insertable = true, updatable = true)
	public String getSobservacion() {
		return this.sobservacion;
	}

	public void setSobservacion(String sobservacion) {
		this.sobservacion = sobservacion;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "F_DEPURACION", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFdepuracion() {
		return this.fdepuracion;
	}

	public void setFdepuracion(Date fdepuracion) {
		this.fdepuracion = fdepuracion;
	}

	@Column(name = "V_TOTAL_IMP", unique = false, nullable = true, insertable = true, updatable = true, precision = 13)
	public BigDecimal getVtotalImp() {
		return this.vtotalImp;
	}

	public void setVtotalImp(BigDecimal vtotalImp) {
		this.vtotalImp = vtotalImp;
	}

	@Column(name = "V_TOTAL_MULT", unique = false, nullable = true, insertable = true, updatable = true, precision = 13)
	public BigDecimal getVtotalMult() {
		return this.vtotalMult;
	}

	public void setVtotalMult(BigDecimal vtotalMult) {
		this.vtotalMult = vtotalMult;
	}

	@Column(name = "V_TOTAL", unique = false, nullable = true, insertable = true, updatable = true, precision = 13)
	public BigDecimal getVtotal() {
		return this.vtotal;
	}

	public void setVtotal(BigDecimal vtotal) {
		this.vtotal = vtotal;
	}

	@Column(name = "V_TOTAL_INT", unique = false, nullable = true, insertable = true, updatable = true, precision = 13)
	public BigDecimal getVtotalInt() {
		return this.vtotalInt;
	}

	public void setVtotalInt(BigDecimal vtotalInt) {
		this.vtotalInt = vtotalInt;
	}

	@Column(name = "C_TIPO_BOLETA", unique = false,    nullable = true, insertable = true, updatable = true, length = 7  )
	public String getCtipoBoleta() {
		return this.ctipoBoleta;
	}

	public void setCtipoBoleta(String ctipoBoleta) {
		this.ctipoBoleta = ctipoBoleta;
	}

	@OneToMany( fetch = FetchType.LAZY, mappedBy = "dcSaldAnt")
	public Set<DcSaldAntDet> getDcSaldAntDets() {
		return this.dcSaldAntDets;
	}

	public void setDcSaldAntDets(Set<DcSaldAntDet> dcSaldAntDets) {
		this.dcSaldAntDets = dcSaldAntDets;
	}

}
